/**
 * 路由配置
 */

import { NgModule } from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {HomeComponent} from './home/home.component'; // 首页
import {NewsComponent} from './news/news.component'; // 新闻

const routes: Routes = [
  {path: '', component: HomeComponent}, // 首页
  {path: 'news/:id', component: NewsComponent} // 新闻
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
  providers: []
})
export class AppRoutingModule {}
